luci-app-watchcat: use DynamicList for pinghosts
authorIvan Diaz <[email protected]>
Thu, 16 Oct 2025 01:51:01 +0000 (20:51 -0500)
committerPaul Donald <[email protected]>
Tue, 9 Dec 2025 17:18:42 +0000 (18:18 +0100)
Switch to DynamicList to improve multi-host handling in the UI.

Signed-off-by: Ivan Diaz <[email protected]>
applications/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js

index ed9318d485076ccc662b03760c68eeeca8984a96..96c2fc2d9c4ae5324b9a8ea0523356601f74c75a 100644 (file)
@@ -56,16 +56,6 @@ return view.extend({
                o.depends({ mode: "restart_iface" });
                o.depends({ mode: "run_script" });
 
-               o.load = function(section_id) {
-                       return (String(this.map.data.get('watchcat', section_id, 'pinghosts') || '')
-                       .trim().split(/\s+/).filter(Boolean))
-               }
-
-               o.write = function(section_id, formvalue) {
-                       this.map.data.set('watchcat', section_id, 'pinghosts',
-                       (formvalue || []).map(v => String(v).trim()).filter(Boolean).join(' '))
-               }
-
                o = s.taboption('general', form.ListValue, 'addressfamily',
                                _('Address family for pinging the host'));
                o.default = 'any';